package com.wyx.suanfa;

import java.util.Arrays;

/**
 * @author 王艺锡
 * @version 1.0
 */
public class longestPalindrome {
    public static void main(String[] args) {
        boolean[][] dp = new boolean[5][5];
        System.out.println(dp);
    }


}
/*class Solution {
    public String longestPalindrome(String s) {
        boolean[][] dp = new boolean[s.length()][s.length()];
        int maxLen = 0;
        int left = 0;
        int right = 0;

        for(int i = s.length() - 1;i >= 0;i--){
            for(int j = i;j < s.length();j++){
                if(s.charAt(i) == s.charAt(j)){
                    if(j - i <= 1){
                        dp[i][j] = true;
                    }else if(dp[i + 1][j - 1]){
                        dp[i][j] = true;
                    }
                }

                if(dp[i][j] && j - i + 1 > maxLen){
                    maxLen = j - i + 1;
                    left = i;
                    right = j;
                }
            }
        }

        return s.substring(left,right + 1);


    }
}*/